#include "mythread.h"
#include<QDebug>

MyThread::MyThread(QObject *parent) : QObject(parent)
{
    isStop = false;
}

void MyThread::myTimeout()
{
    while(isStop == false)
    {
       QThread::sleep(1);
       emit mySignal();
       qDebug() << "子线程号" << QThread::currentThread();

    }
}

void MyThread::setFlag(bool flag)
{
    isStop = flag;
}
